home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C++ / Frameworks / Sprocket Framework DR2 / Sprocket Framework Interfaces / SerialNumberProtection.h < prev    next >
Encoding:
Text File  |  1996-05-10  |  1.0 KB  |  51 lines  |  [TEXT/CWIE]

  1. // Sprocket Framework header file
  2. // SerialNumberProtection.h
  3.  
  4.  
  5. #ifndef        _SERIALNUMBERPROTECTION_
  6. #define        _SERIALNUMBERPROTECTION_
  7.  
  8. #ifndef __APPLETALK__
  9. #include <Appletalk.h>
  10. #endif
  11.  
  12. class    TSerialNumberProtection
  13. {
  14. public:
  15.                         TSerialNumberProtection(short    ResourceID);
  16.     virtual                ~TSerialNumberProtection();
  17.  
  18.  
  19.     OSErr                EnableProtection(void);
  20.     
  21.     OSErr                RegisterName( UInt8 inSocket );
  22.     
  23.     virtual OSErr        ReadRegistration(StringPtr SN, StringPtr Name, StringPtr Company);
  24.     virtual OSErr        WriteRegistration(StringPtr SN, StringPtr Name, StringPtr Company);
  25.     virtual OSErr        VerifyRegistration(StringPtr SN, StringPtr Name, StringPtr Company);
  26.     
  27.     
  28.     enum {
  29.                         kNoLicense = 0,
  30.                         kSingleUserLicense = 1,
  31.                         kFiveUserLicense = 5,
  32.                         kSiteLicense = 32766
  33.             };
  34.  
  35.  
  36. protected:
  37.  
  38.     void                MangleRegistration(void);
  39.     void                UnmangleRegistration(void);
  40.  
  41.     NamesTableEntry        fNTE;
  42.     EntityName            fEntity;
  43.     Str32                fSerialNumber;
  44.     Str255                fName;
  45.     Str255                fCompany;
  46.     Str255                fPlainName;
  47.     short                fNumOfLicenses;
  48.     short                fResourceID;
  49. };
  50.     
  51. #endif